package com.example.zdxk.mapper.primary;
import com.example.zdxk.entity.Term;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface TermMapper {
    //@Select("SELECT * FROM dc_terminfo WHERE id = #{id}")
    public  Term getTerminfoById(Integer id);

    // @Select("SELECT * FROM dc_terminfo")
    public List<Term> getTerminfoList(int page, int limit);
    public List<Term> getTerminfoList2();
    // @Insert("insert into dc_terminfo(term_imei, term_provider) values(#{term_imei}, #{term_provider})")
    public int add(Term terminfo);



    // @Update("UPDATE dc_terminfo SET  term_provider = #{dc_terminfo.term_provider} WHERE term_imei = #{term_imei}")
    public int update(Term terminfo);

    // @Delete("DELETE FROM dc_terminfo WHERE term_imei = #{term_imei} ")
    public int delete(Integer id);

    public int getTerminfocount();
    //@Select("SELECT term_imei FROM dc_terminfo WHERE term_imei = #{term_imei}")
    public  Term getTerminfoByImei(String term_imei);

}
